package com.atguigu.boot.controller;

import com.atguigu.boot.entity.Dog;
import com.atguigu.boot.entity.MyBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName DogController
 * @Description 此类描述:
 * @Author dangchen
 * @DateTime 2022-09-13 19:08
 * @Version 1.0
 */
@RestController
@Slf4j
public class DogController {
    @Autowired
    private Dog dog;

    @Autowired
    private MyBean myBean;


    @GetMapping("/dogInfo")
    public String dogInfo(){
        log.debug("---debug:{}",dog.toString());
        log.debug("---info:{}",dog.toString());
        log.debug("---warn:{}",dog.toString());
        log.debug("---error:{}",dog.toString());

        return dog.toString() +"\n"+ myBean.toString();
    }
}
